package com.newstart.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by liushijie on 2018/5/28.
 */
@RefreshScope//动态刷新配置文件获取
@RestController
public class ConfigTestController {


    @Value("${info.profile}")
    private String refreshTest;

    //获取git上的配置
    @RequestMapping("/refreshTest")
    public String refreshTest() {
        return this.refreshTest;
    }

}
